<!DOCTYPE html><html lang="zh-CN"><head><meta name="generator" content="Hexo 3.8.0"><meta name="google-site-verification" content="wD1H9sqEoDWmIBFt7TjlgbVqcJqiqpwR2Wq7_bvEHcE"><meta name="baidu-site-verification" content="RZErJH3v0Z"><meta charset="utf-8"><link rel="icon" href="/css/images/my_logo.png" type="image/x-icon"><title>SpringBoot集成Flowable UI | ArtIsLong的博客</title><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="description" content="经过两周左右时间的学习，Flowable基础知识自认为学习完毕，简单构思设计之后，开始上手实践了。由于Flowable官方已经提供了丰富的REST包（和Activiti差不多），基本功能已经满足我们的要求了，个别接口不适用的可自行重写稍作调整即可。"><meta name="keywords" content="工作流"><meta property="og:type" content="article"><meta property="og:title" content="SpringBoot集成Flowable UI"><meta property="og:url" content="/2019/06/27/SpringBoot集成Flowable-UI/index.html"><meta property="og:site_name" content="ArtIsLong的博客"><meta property="og:description" content="经过两周左右时间的学习，Flowable基础知识自认为学习完毕，简单构思设计之后，开始上手实践了。由于Flowable官方已经提供了丰富的REST包（和Activiti差不多），基本功能已经满足我们的要求了，个别接口不适用的可自行重写稍作调整即可。"><meta property="og:locale" content="zh-CN"><meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5688362-85e60b8de37aca10.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5688362-17b8a05864b7a40b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5688362-bd259f559420789c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5688362-fc6dfd540a9a3d54.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><meta property="og:image" content="https://upload-images.jianshu.io/upload_images/5688362-2d1072782ca19155.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><meta property="og:image" content="https://artislong.oss-cn-hangzhou.aliyuncs.com/images/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B71.png"><meta property="og:updated_time" content="2020-03-30T06:17:07.827Z"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="SpringBoot集成Flowable UI"><meta name="twitter:description" content="经过两周左右时间的学习，Flowable基础知识自认为学习完毕，简单构思设计之后，开始上手实践了。由于Flowable官方已经提供了丰富的REST包（和Activiti差不多），基本功能已经满足我们的要求了，个别接口不适用的可自行重写稍作调整即可。"><meta name="twitter:image" content="https://upload-images.jianshu.io/upload_images/5688362-85e60b8de37aca10.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"><link rel="alternate" href="/atom.xml" title="ArtIsLong的博客" type="application/atom+xml"><link rel="stylesheet" href="/libs/font-awesome5/css/fontawesome.min.css"><link rel="stylesheet" href="/libs/font-awesome5/css/fa-brands.min.css"><link rel="stylesheet" href="/libs/font-awesome5/css/fa-solid.min.css"><link rel="stylesheet" href="/libs/open-sans/styles.css"><link rel="stylesheet" href="/libs/source-code-pro/styles.css"><link rel="stylesheet" href="/css/style.css"><script src="/libs/jquery/2.1.3/jquery.min.js"></script><link rel="stylesheet" href="/libs/lightgallery/css/lightgallery.min.css"><link rel="stylesheet" href="/libs/justified-gallery/justifiedGallery.min.css"><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="//hm.baidu.com/hm.js?b59777544dd5d59ce94e191bac62427c";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><script>!function(){var t=document.createElement("script"),e=window.location.protocol.split(":")[0];t.src="https"===e?"https://zz.bdstatic.com/linksubmit/push.js":"http://push.zhanzhang.baidu.com/push.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(t,s)}()</script><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client:"ca-pub-4444107320537106",enable_page_level_ads:!0})</script></head></html><body><div id="container"><header id="header"><div id="header-main" class="header-inner"><div class="outer"><a href="/" id="logo"><i class="logo"></i> <span class="site-title">ArtIsLong的博客</span></a><nav id="main-nav"> <a class="main-nav-link" href="/.">首页</a> <a class="main-nav-link" href="/archives">归档</a> <a class="main-nav-link" href="/books">书架</a> <a class="main-nav-link" href="/about">关于我</a></nav><nav id="sub-nav"><div class="profile" id="profile-nav"> <a id="profile-anchor" href="javascript:;"><img class="avatar" src="/css/images/head.png"><i class="fas fa-caret-down"></i></a></div></nav><div id="search-form-wrap"><form class="search-form"> <input type="text" class="ins-search-input search-form-input" placeholder="搜索"> <button type="submit" class="search-form-submit"></button></form><div class="ins-search"><div class="ins-search-mask"></div><div class="ins-search-container"><div class="ins-input-wrapper"> <input type="text" class="ins-search-input" placeholder="想要查找什么..."><span class="ins-close ins-selectable"><i class="fas fa-times-circle"></i></span></div><div class="ins-section-wrapper"><div class="ins-section-container"></div></div></div></div><script>window.INSIGHT_CONFIG={TRANSLATION:{POSTS:"文章",PAGES:"页面",CATEGORIES:"分类",TAGS:"标签",UNTITLED:"(未命名)"},ROOT_URL:"/",CONTENT_URL:"/content.json"}</script><script src="/js/insight.js"></script></div></div></div><div id="main-nav-mobile" class="header-sub header-inner"><table class="menu outer"><tr><td><a class="main-nav-link" href="/.">首页</a></td><td><a class="main-nav-link" href="/archives">归档</a></td><td><a class="main-nav-link" href="/books">书架</a></td><td><a class="main-nav-link" href="/about">关于我</a></td><td><div class="search-form"> <input type="text" class="ins-search-input search-form-input" placeholder="搜索"></div></td></tr></table></div></header><div class="outer"><aside id="profile" class="profile-fixed"><div class="inner profile-inner"><div class="base-info profile-block"> <a href="/"><img id="avatar" src="/css/images/head.png"></a><h2 id="name">ArtIsLong</h2><h3 id="title">不吹牛，不装逼，只做最单纯的技术分享</h3><span id="location"><i class="fas fa-map-marker-alt" style="padding-right:5px"></i> Shanghai, China</span> <a id="follow" target="_blank" href="https://github.com/ArtIsLong">关注我</a></div><div class="article-info profile-block"><div class="article-info-block"> 39 <span>文章</span></div><div class="article-info-block"> 30 <span>标签</span></div></div><div class="profile-block social-links"><table><tr><td><a href="http://github.com/ArtIsLong" target="_blank" title="Github" class="tooltip"><i class="fab fa-github"></i></a></td><td> <a href="https://gitee.com/artislong" target="_blank" title="Gitee" class="tooltip"><i class="fab"><img src="https://gitee.com/artislong/artislong/widgets/widget_5.svg" style="height:25px;margin-bottom:-5px"></i></a></td><td> <a href="https://www.jianshu.com/u/46d989a94f20" target="_blank" title="简书" class="tooltip"><i class="fab"><span style="height:25px;margin-bottom:-5px;color:#ff8c00">简</span></i></a></td><td> <a href="mailto:chenmin049@163.com" target="_blank" title="E-Mail" class="tooltip"><i class="fab"><span style="height:25px;width:20px;margin-bottom:-5px;color:#1e90ff;font-size:16px">Mail</span></i></a></td><td><a href="/atom.xml" target="_blank" title="RSS" class="tooltip"><i class="fas fa-rss"></i></a></td></tr></table></div></div></aside><section id="main"><article id="post-SpringBoot集成Flowable-UI" class="article article-type-post" itemscope="" itemprop="blogPost"><div class="article-inner"><header class="article-header"><h1 class="article-title" itemprop="name"> SpringBoot集成Flowable UI</h1><div class="article-meta"><div class="article-date"><i class="fas fa-calendar-alt"></i> <a href="/2019/06/27/SpringBoot集成Flowable-UI/"><time datetime="2019-06-26T16:27:21.000Z" itemprop="datePublished">2019-06-27 00:27:21</time></a></div><div class="article-category"><i class="fas fa-folder"></i> <a class="article-category-link" href="/categories/工作流/">工作流</a><i class="fas fa-angle-right"></i><a class="article-category-link" href="/categories/工作流/Flowable/">Flowable</a></div><div class="article-tag"><i class="fas fa-tag"></i> <a class="tag-link" href="/tags/工作流/">工作流</a></div><div style="font-size:12px"><span id="busuanzi_container_page_pv">阅读次数：<span id="busuanzi_value_page_pv"></span></span></div></div></header><div class="article-entry" itemprop="articleBody"><div id="toc" class="toc-article"> <strong class="toc-title">文章目录</strong><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#开始集成"><span class="toc-number">1.</span> <span class="toc-text">开始集成</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#后端集成"><span class="toc-number">1.1.</span> <span class="toc-text">后端集成</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#集成思路出现偏差"><span class="toc-number">1.2.</span> <span class="toc-text">集成思路出现偏差</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Flowable与SpringBoot版本坑"><span class="toc-number">1.3.</span> <span class="toc-text">Flowable与SpringBoot版本坑</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#Flowable官方包冲突"><span class="toc-number">1.4.</span> <span class="toc-text">Flowable官方包冲突</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#登录权限问题"><span class="toc-number">1.5.</span> <span class="toc-text">登录权限问题</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#页面集成"><span class="toc-number">2.</span> <span class="toc-text">页面集成</span></a></li></ol></div><p>经过两周左右时间的学习，Flowable基础知识自认为学习完毕，简单构思设计之后，开始上手实践了。由于Flowable官方已经提供了丰富的REST包（和Activiti差不多），基本功能已经满足我们的要求了，个别接口不适用的可自行重写稍作调整即可。<a id="more"></a></p><p>Flowable官方提供的五个war包</p><table><br><thead><br><tr><th width="22%">starter</th><th>描述</th><th width="20%">在线体验</th></tr><br></thead><br><tbody><br><tr><td style="color:orange">flowable-modeler</td><td>让具有建模权限的用户可以创建流程模型、表单、选择表与应用定义。</td><td><a target="_blank" href="http://suo.im/6h2yO8">http://suo.im/6h2yO8</a></td></tr><br><tr><td style="color:orange">flowable-idm</td><td>身份管理应用。为所有Flowable UI应用提供单点登录认证功能，并且为拥有IDM管理员权限的用户提供了管理用户、组与权限的功能</td><td><a target="_blank" href="http://suo.im/5UukYT">http://suo.im/5UukYT</a></td></tr><br><tr><td style="color:orange">flowable-task</td><td>运行时任务应用。提供了启动流程实例、编辑任务表单、完成任务，以及查询流程实例与任务的功能。</td><td><a target="_blank" href="http://suo.im/5EHlJk">http://suo.im/5EHlJk</a></td></tr><br><tr><td style="color:orange">flowable-admin</td><td>管理应用。让具有管理员权限的用户可以查询BPMN、DMN、Form及Content引擎，并提供了许多选项用于修改流程实例、任务、作业等。管理应用通过REST API连接至引擎，并与Flowable Task应用及Flowable REST应用一同部署。</td><td><a target="_blank" href="http://suo.im/620z1q">http://suo.im/620z1q</a></td></tr><br><tr><td style="color:orange">flowable-rest</td><td>Flowable页面包含的常用REST API</td><td></td></tr><br></tbody><br></table><p>在线体验账号：<strong>admin/123</strong> (<font color="red">个人服务器，配置较低，仅供体验，请勿对应用进行压测</font>)</p><p><strong>先访问idm，使用体验账号登录后，再去访问modeler，task，admin其他模块</strong></p><p>以官方提供的war包为基准，集成以上四个默认页面对应的REST接口。</p><h3 id="开始集成"><a href="#开始集成" class="headerlink" title="开始集成"></a>开始集成</h3><h4 id="后端集成"><a href="#后端集成" class="headerlink" title="后端集成"></a>后端集成</h4><ul><li>maven</li></ul><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.flowable<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>flowable-spring-boot-starter-rest<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;flowable.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- flowable UI集成 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.flowable<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>flowable-ui-modeler-conf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;flowable.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.flowable<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>flowable-ui-task-conf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;flowable.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.flowable<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>flowable-ui-admin-conf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;flowable.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.flowable<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>flowable-ui-idm-conf<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;flowable.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure><ul><li>gradle</li></ul><figure class="highlight groovy"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">compile <span class="string">group:</span> <span class="string">'org.flowable'</span>, <span class="string">name:</span> <span class="string">'flowable-spring-boot-starter-rest'</span>, <span class="string">version:</span><span class="string">'6.4.1'</span></span><br><span class="line">compile <span class="string">group:</span> <span class="string">'org.flowable'</span>, <span class="string">name:</span> <span class="string">'flowable-ui-modeler-conf'</span>, <span class="string">version:</span><span class="string">'6.4.1'</span></span><br><span class="line">compile <span class="string">group:</span> <span class="string">'org.flowable'</span>, <span class="string">name:</span> <span class="string">'flowable-ui-task-conf'</span>, <span class="string">version:</span><span class="string">'6.4.1'</span></span><br><span class="line">compile <span class="string">group:</span> <span class="string">'org.flowable'</span>, <span class="string">name:</span> <span class="string">'flowable-ui-admin-conf'</span>, <span class="string">version:</span><span class="string">'6.4.1'</span></span><br><span class="line">compile <span class="string">group:</span> <span class="string">'org.flowable'</span>, <span class="string">name:</span> <span class="string">'flowable-ui-idm-conf'</span>, <span class="string">version:</span><span class="string">'6.4.1'</span></span><br></pre></td></tr></table></figure><p><strong>注：</strong></p><blockquote><p>flowable-ui-xxx-conf: UI独立于业务外的配置<br>flowable-ui-xxx-logic: UI的业务逻辑<br>flowable-ui-xxx-rest: 提供常用的操作REST API</p></blockquote><p>以上就是集成Flowable UI的基础包了。</p><p>由于flowable-ui-xxx-conf中包中，每个中都有对应自己的如<code>ApplicationConfiguration</code>等配置类，所以如果用默认配置会出现</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">conflicts with existing, non-compatible bean definition of same name and class</span><br></pre></td></tr></table></figure><p>类似的错误信息，提示在Spring容器中存在两个相同名称的Bean。</p><p>所以不能使用默认的配置类，只能自己去编写配置类，完成flowable-ui-xxx-conf的配置。</p><ul><li>AppDispatcherServletConfiguration</li></ul><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@ComponentScan</span>(value = &#123;</span><br><span class="line">        <span class="string">"org.flowable.ui.admin.rest"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.task.rest.runtime"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.idm.rest.app"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.rest.exception"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.modeler.rest.app"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.rest"</span>&#125;,</span><br><span class="line">        excludeFilters = &#123;</span><br><span class="line">                <span class="meta">@ComponentScan</span>.Filter(type = FilterType.ASSIGNABLE_TYPE, value = RemoteAccountResource.class),</span><br><span class="line">                <span class="meta">@ComponentScan</span>.Filter(type = FilterType.ASSIGNABLE_TYPE, value = StencilSetResource.class),</span><br><span class="line">                <span class="meta">@ComponentScan</span>.Filter(type = FilterType.ASSIGNABLE_TYPE, value = EditorUsersResource.class),</span><br><span class="line">                <span class="meta">@ComponentScan</span>.Filter(type = FilterType.ASSIGNABLE_TYPE, value = EditorGroupsResource.class)</span><br><span class="line">        &#125;)</span><br><span class="line"><span class="meta">@EnableAsync</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">AppDispatcherServletConfiguration</span> <span class="keyword">implements</span> <span class="title">WebMvcRegistrations</span></span></span><br><span class="line"><span class="class">// 下面类内容省略，可参考<span class="title">org</span>.<span class="title">flowable</span>.<span class="title">ui</span>.<span class="title">xxx</span>.<span class="title">servlet</span>.<span class="title">AppDispatcherServletConfiguration</span>类</span></span><br></pre></td></tr></table></figure><p><font color="red"><strong>注:</strong></font> 通过<code>StencilSetResource</code>类汉化流程设计器(其实没必要重写类，只需要将stencilset_bpmn.json文件内容汉化即可，重写的目的是以后可以通过此处兼容国际化)</p><ul><li>ApplicationConfiguration</li></ul><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableConfigurationProperties</span>(&#123;FlowableIdmAppProperties.class, FlowableModelerAppProperties.class, FlowableAdminAppProperties.class&#125;)</span><br><span class="line"><span class="meta">@ComponentScan</span>(</span><br><span class="line">    basePackages = &#123;</span><br><span class="line">        <span class="string">"org.flowable.ui.admin.repository"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.admin.service"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.task.model.component"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.task.service.runtime"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.task.service.debugger"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.idm.conf"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.idm.security"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.idm.service"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.modeler.repository"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.modeler.service"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.filter"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.service"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.repository"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.security"</span>,</span><br><span class="line">        <span class="string">"org.flowable.ui.common.tenant"</span></span><br><span class="line">    &#125;,</span><br><span class="line">    excludeFilters = &#123;</span><br><span class="line">        <span class="meta">@ComponentScan</span>.Filter(type = FilterType.ASSIGNABLE_TYPE, value = org.flowable.ui.idm.conf.ApplicationConfiguration.class)</span><br><span class="line">    &#125;</span><br><span class="line">)</span><br></pre></td></tr></table></figure><p><font color="red"><strong>注:</strong></font> 通过@ComponentScan注解，扫描需要的包及其接口。</p><ul><li>DatabaseConfiguration</li></ul><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 重写flowable-ui-xxx-conf 中的 DatabaseConfiguration 类,</span></span><br><span class="line"><span class="comment"> * 包括:flowable-ui-modeler-conf和flowable-ui-admin-conf 的DatabaseConfiguration</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Configuration</span></span><br><span class="line"><span class="meta">@EnableTransactionManagement</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">DatabaseConfiguration</span> </span>&#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> Logger LOGGER = LoggerFactory.getLogger(DatabaseConfiguration.class);</span><br><span class="line">    <span class="meta">@Bean</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> Liquibase <span class="title">modelerLiquibase</span><span class="params">(DataSource dataSource)</span> </span>&#123;</span><br><span class="line">        Liquibase liquibase = <span class="keyword">null</span>;</span><br><span class="line">        <span class="keyword">try</span> &#123;</span><br><span class="line">            DatabaseConnection connection = <span class="keyword">new</span> JdbcConnection(dataSource.getConnection());</span><br><span class="line">            Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);</span><br><span class="line">            database.setDatabaseChangeLogTableName(<span class="string">"ACT_DE_"</span> + database.getDatabaseChangeLogTableName());</span><br><span class="line">            database.setDatabaseChangeLogLockTableName(<span class="string">"ACT_DE_"</span> + database.getDatabaseChangeLogLockTableName());</span><br><span class="line">            liquibase = <span class="keyword">new</span> Liquibase(<span class="string">"META-INF/liquibase/flowable-modeler-app-db-changelog.xml"</span>, <span class="keyword">new</span> ClassLoaderResourceAccessor(), database);</span><br><span class="line">            liquibase.update(<span class="string">"flowable"</span>);</span><br><span class="line">            <span class="keyword">return</span> liquibase;</span><br><span class="line">        &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line">            <span class="keyword">throw</span> <span class="keyword">new</span> InternalServerErrorException(<span class="string">"Error creating liquibase database"</span>, e);</span><br><span class="line">        &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line">            closeDatabase(liquibase);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="meta">@Bean</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> Liquibase <span class="title">adminLiquibase</span><span class="params">(DataSource dataSource)</span> </span>&#123;</span><br><span class="line">        LOGGER.debug(<span class="string">"Configuring Liquibase"</span>);</span><br><span class="line">        Liquibase liquibase = <span class="keyword">null</span>;</span><br><span class="line">        <span class="keyword">try</span> &#123;</span><br><span class="line">            DatabaseConnection connection = <span class="keyword">new</span> JdbcConnection(dataSource.getConnection());</span><br><span class="line">            Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);</span><br><span class="line">            database.setDatabaseChangeLogTableName(<span class="string">"ACT_ADM_"</span> + database.getDatabaseChangeLogTableName());</span><br><span class="line">            database.setDatabaseChangeLogLockTableName(<span class="string">"ACT_ADM_"</span> + database.getDatabaseChangeLogLockTableName());</span><br><span class="line">            liquibase = <span class="keyword">new</span> Liquibase(<span class="string">"META-INF/liquibase/flowable-admin-app-db-changelog.xml"</span>, <span class="keyword">new</span> ClassLoaderResourceAccessor(), database);</span><br><span class="line">            liquibase.update(<span class="string">"flowable"</span>);</span><br><span class="line">            <span class="keyword">return</span> liquibase;</span><br><span class="line">        &#125; <span class="keyword">catch</span> (Exception e) &#123;</span><br><span class="line">            <span class="keyword">throw</span> <span class="keyword">new</span> InternalServerErrorException(<span class="string">"Error creating liquibase database"</span>);</span><br><span class="line">        &#125; <span class="keyword">finally</span> &#123;</span><br><span class="line">            closeDatabase(liquibase);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">closeDatabase</span><span class="params">(Liquibase liquibase)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">if</span> (liquibase != <span class="keyword">null</span>) &#123;</span><br><span class="line">            Database database = liquibase.getDatabase();</span><br><span class="line">            <span class="keyword">if</span> (database != <span class="keyword">null</span>) &#123;</span><br><span class="line">                <span class="keyword">try</span> &#123;</span><br><span class="line">                    database.close();</span><br><span class="line">                &#125; <span class="keyword">catch</span> (DatabaseException e) &#123;</span><br><span class="line">                    LOGGER.warn(<span class="string">"Error closing database"</span>, e);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><font color="red"><strong>注:</strong></font> 创建Modeler的模型存储表和Admin首页的服务配置表。</p><ul><li>TaskUserCacheImpl</li></ul><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 重写 &#123;<span class="doctag">@link</span> org.flowable.ui.task.service.idm.UserCacheImpl&#125; 类,避免启动时和 &#123;<span class="doctag">@link</span> org.flowable.ui.idm.service.UserCacheImpl&#125; 命名冲突</span></span><br><span class="line"><span class="comment"> * Cache containing User objects to prevent too much DB-traffic (users exist separately from the Flowable tables, they need to be fetched afterward one by one to join with those entities).</span></span><br><span class="line"><span class="comment"> * &lt;p&gt;</span></span><br><span class="line"><span class="comment"> *</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Frederik Heremans</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Joram Barrez</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@author</span> Filip Hrisafov</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">TaskUserCacheImpl</span> <span class="keyword">implements</span> <span class="title">UserCache</span></span></span><br></pre></td></tr></table></figure><p><font color="red"><strong>注:</strong></font> 重写 {@link org.flowable.ui.task.service.idm.UserCacheImpl} 类,避免启动时和 {@link org.flowable.ui.idm.service.UserCacheImpl} 命名冲突</p><ul><li>org.flowable.ui.admin.service.engine.CmmnTaskService</li></ul><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> org.flowable.ui.admin.service.engine;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 覆盖jar包中的CmmnTaskService的定义，修改Bean的定义名称,避免和org.flowable.cmmn.api.CmmnTaskService命名冲突</span></span><br><span class="line"><span class="comment"> * Service for invoking Flowable REST services.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">@Service</span>(<span class="string">"adminCmmnTaskService"</span>)</span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">CmmnTaskService</span></span></span><br></pre></td></tr></table></figure><p>由于flowable官方提供的jar包导致的冲突问题解决完毕之后，以下是application.yml中需要对Flowable做的配置，其他如数据源相关配置省略，此处不再累述。</p><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">flowable:</span></span><br><span class="line"><span class="attr">  labelFontName:</span> <span class="string">宋体</span></span><br><span class="line"><span class="attr">  activityFontName:</span> <span class="string">宋体</span></span><br><span class="line"><span class="attr">  annotationFontName:</span> <span class="string">宋体</span></span><br><span class="line"><span class="attr">  rest:</span></span><br><span class="line"><span class="attr">    app:</span></span><br><span class="line"><span class="attr">      authentication-mode:</span> <span class="string">verify-privilege</span></span><br><span class="line"><span class="attr">  process:</span></span><br><span class="line"><span class="attr">    definition-cache-limit:</span> <span class="number">1</span></span><br><span class="line"><span class="attr">  idm:</span></span><br><span class="line"><span class="attr">    app:</span></span><br><span class="line"><span class="attr">      admin:</span></span><br><span class="line"><span class="attr">        password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">        user-id:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">        first-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">        last-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">  common:</span></span><br><span class="line"><span class="attr">    app:</span></span><br><span class="line"><span class="attr">      role-prefix:</span></span><br><span class="line"><span class="attr">      idm-url:</span> <span class="attr">http://localhost:$&#123;server.port&#125;/$&#123;spring.application.name&#125;/idm</span></span><br><span class="line"><span class="attr">  xml:</span></span><br><span class="line"><span class="attr">    encoding:</span> <span class="string">UTF-8</span></span><br><span class="line"><span class="attr">  modeler:</span></span><br><span class="line"><span class="attr">    app:</span></span><br><span class="line"><span class="attr">      rest-enabled:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">  admin:</span></span><br><span class="line"><span class="attr">    app:</span></span><br><span class="line"><span class="attr">      security:</span></span><br><span class="line"><span class="attr">        encryption:</span></span><br><span class="line"><span class="attr">          credentials-secret-spec:</span> <span class="number">9</span><span class="string">FGl73ngxcOoJvmL</span></span><br><span class="line"><span class="attr">          credentials-i-v-spec:</span> <span class="string">j8kdO2hejA9lKmm6</span></span><br><span class="line"><span class="attr">      server-config:</span></span><br><span class="line"><span class="attr">        app:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">app-api</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">App</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">App</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">        process:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">process-api</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">Process</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">Process</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">        form:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">form-api</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">Form</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">Form</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">        dmn:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">dmn-api</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">DMN</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">DMN</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">        cmmn:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">cmmn-api</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">CMMN</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">CMMN</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">        content:</span></span><br><span class="line"><span class="attr">          context-root:</span> <span class="string">$&#123;spring.application.name&#125;</span></span><br><span class="line"><span class="attr">          server-address:</span> <span class="attr">http://localhost</span></span><br><span class="line"><span class="attr">          password:</span> <span class="string">test</span></span><br><span class="line"><span class="attr">          user-name:</span> <span class="string">admin</span></span><br><span class="line"><span class="attr">          rest-root:</span> <span class="string">content-api</span></span><br><span class="line"><span class="attr">          port:</span> <span class="string">$&#123;server.port&#125;</span></span><br><span class="line"><span class="attr">          name:</span> <span class="string">Flowable</span> <span class="string">Content</span> <span class="string">app</span></span><br><span class="line"><span class="attr">          description:</span> <span class="string">Flowable</span> <span class="string">Content</span> <span class="string">REST</span> <span class="string">config</span></span><br><span class="line"><span class="attr">  database-schema-update:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">management:</span></span><br><span class="line"><span class="attr">  endpoint:</span></span><br><span class="line"><span class="attr">    health:</span></span><br><span class="line"><span class="attr">      roles:</span> <span class="string">access-admin</span></span><br><span class="line"><span class="attr">      show-details:</span> <span class="string">when_authorized</span></span><br><span class="line"><span class="attr">  endpoints:</span></span><br><span class="line"><span class="attr">    jmx:</span></span><br><span class="line"><span class="attr">      unique-names:</span> <span class="literal">true</span></span><br><span class="line"><span class="comment"># MyBatis配置比较重要，手动去扫描Flowable默认的Mapper.xml，以及设置字段类型</span></span><br><span class="line"><span class="attr">mybatis:</span></span><br><span class="line"><span class="attr">  mapper-locations:</span></span><br><span class="line"><span class="attr">    - classpath:</span><span class="string">/META-INF/admin-mybatis-mappings/*.xml</span></span><br><span class="line"><span class="attr">    - classpath:</span><span class="string">/META-INF/modeler-mybatis-mappings/*.xml</span></span><br><span class="line"><span class="attr">  configuration-properties:</span></span><br><span class="line"><span class="attr">    prefix:</span></span><br><span class="line"><span class="attr">    boolValue:</span> <span class="literal">TRUE</span></span><br><span class="line"><span class="attr">    blobType:</span> <span class="string">BLOB</span></span><br></pre></td></tr></table></figure><p>至此后端集成完毕。</p><h4 id="集成思路出现偏差"><a href="#集成思路出现偏差" class="headerlink" title="集成思路出现偏差"></a>集成思路出现偏差</h4><p>一开始准备将官方提供的页面集成到后端工程来，但是由于modeler页面我是直接放到static目录下的，而其他三个页面只能自己建目录存放（idm, admin, task），导致访问modeler时是以后端项目请求路径为根访问路径的，在modeler请求后端接口时，请求路径没有问题；可访问idm、admin、task时，则必须加上idm/路径，导致请求后端接口时，不管将前端请求后端的路径改为相对路径还是绝对路径，最终请求路径都存在问题。此处花费时间较多。下面会讲讲新的页面集成方式。</p><h4 id="Flowable与SpringBoot版本坑"><a href="#Flowable与SpringBoot版本坑" class="headerlink" title="Flowable与SpringBoot版本坑"></a>Flowable与SpringBoot版本坑</h4><p><code>flowable-ui-modeler-conf</code>中<code>AppDispatcherServletConfiguration</code>配置类，实现了<code>WebMvcRegistrations</code>接口，SpringBoot1.x中，WebMvcRegistrations在<code>spring-boot-autoconfigure</code>中的web包下，而在SpringBoot2.x中，WebMvcRegistrations被移到web.servlet下了，所以在使用默认类时，SpringBoot版本必须是2.x。</p><h4 id="Flowable官方包冲突"><a href="#Flowable官方包冲突" class="headerlink" title="Flowable官方包冲突"></a>Flowable官方包冲突</h4><p>由于是根据flowable-modeler、flowable-idm、flowable-task、flowable-admin来集成的，所以后端基础包也是需要这对应的四个，故直接集成了flowable-ui-modeler-conf、flowable-ui-idm-conf、flowable-ui-task-conf、flowable-ui-admin-conf，但是由于这四个包中存在各自的自动配置类，而且在modeler和admin中，自动配置类又和他自己的业务逻辑有关联，而且存在多个类命名相同的Spring Bean，导致Spring上下文由于出现相同名称的Bean而初始化失败，但是默认配置有些又不能不用，最终的解决办法就是去除原来所有的默认配置，将冲突的通过@ComponentScan的excludeFilters属性移除掉，然后自己去自定义配置。</p><h4 id="登录权限问题"><a href="#登录权限问题" class="headerlink" title="登录权限问题"></a>登录权限问题</h4><p>flowable-ui-modeler-conf、flowable-ui-idm-conf、flowable-ui-task-conf、flowable-ui-admin-conf这四个包中都存在SecurityConfiguration配置类，顾名思义是安全配置，但是在集成的过程中，modeler-conf其实我们希望的是以idm的登录为主，其他模块自己的安全校验配置不需要，但是实际上由于其他模块存在安全配置以及默认的拦截器，导致idm自己的安全验证不能通过。解决方式和上面一样，通过包扫描路径，只扫描自己需要的包路径，而有影响的包要么移除掉，要么自己去实现其中的配置。</p><h3 id="页面集成"><a href="#页面集成" class="headerlink" title="页面集成"></a>页面集成</h3><p>页面集成一开始采用的是集成到后端工程，以后开发自己的页面时，也可直接调用集成好的流程设计器，但是由于其他模块的页面存在问题，故暂时放弃掉这种集成方式，采用Nginx来部署前端，正好满足前后端分离架构。</p><ul><li>Nginx配置</li></ul><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">server &#123;</span><br><span class="line">        listen 8081;</span><br><span class="line">        server_name flowable_ui;</span><br><span class="line">        location / &#123;</span><br><span class="line">            root /user/local/nginx/flowable-ui;</span><br><span class="line">            index index.html index.htm;</span><br><span class="line">        &#125;</span><br><span class="line">        location /flowable_idm &#123;</span><br><span class="line">            proxy_pass http://localhost:8080/flowable;</span><br><span class="line">            proxy_cookie_path  /flowable  /flowable_idm;</span><br><span class="line">        &#125;</span><br><span class="line">        location /flowable_task &#123;</span><br><span class="line">            proxy_pass http://localhost:8080/flowable;</span><br><span class="line">            proxy_cookie_path  /flowable  /flowable_task;</span><br><span class="line">        &#125;</span><br><span class="line">        location /flowable_admin &#123;</span><br><span class="line">            proxy_pass http://localhost:8080/flowable;</span><br><span class="line">            proxy_cookie_path  /flowable  /flowable_admin;</span><br><span class="line">        &#125;</span><br><span class="line">        location /flowable_modeler &#123;</span><br><span class="line">            proxy_pass http://localhost:8080/flowable;</span><br><span class="line">            proxy_cookie_path  /flowable  /flowable_modeler;</span><br><span class="line">        &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p><font color="red"><strong>注:</strong></font> 其实可以通过Nginx将静态资源和动态资源分开解析处理即可，但是我这边尝试的过程中有问题，只能采用简单粗暴的方式了。</p><p>然后在flowable-ui目录下新建modeler、idm、task、admin目录，将flowable-modeler.war、flowable-idm.war、flowable-task.war、flowable-admin.war中的flowable-xxx/WEB-INF/classes/static下的内容分别复制到对应目录下，此时通过<a href="http://localhost:8086/modeler...可看到对应的页面，但是由于动静资源路径一致，导致请求不能转发到后端，所以需要对动态请求和静态资源请求做区分，则需要修改官方页面源码，增加统一的请求路径前缀。" target="_blank" rel="noopener">http://localhost:8086/modeler...可看到对应的页面，但是由于动静资源路径一致，导致请求不能转发到后端，所以需要对动态请求和静态资源请求做区分，则需要修改官方页面源码，增加统一的请求路径前缀。</a></p><p><img src="https://upload-images.jianshu.io/upload_images/5688362-85e60b8de37aca10.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="flowable-ui"></p><p>统一请求路径修改：</p><p>在modeler/scripts/app-cfg.js文件中，修改contextRoot为flowable_modeler，与静态资源访问路径区分开。</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">'use strict'</span>;</span><br><span class="line"><span class="keyword">var</span> FLOWABLE = FLOWABLE || &#123;&#125;;</span><br><span class="line"><span class="keyword">var</span> pathname = <span class="built_in">window</span>.location.pathname.replace(<span class="regexp">/^(\/[^\/]*)(\/.*)?$/</span>, <span class="string">'$1'</span>).replace(<span class="regexp">/\/$/</span>, <span class="string">''</span>);</span><br><span class="line">FLOWABLE.CONFIG = &#123;</span><br><span class="line">	<span class="string">'onPremise'</span> : <span class="literal">true</span>,</span><br><span class="line">	<span class="string">'contextRoot'</span> : <span class="string">"/flowable_modeler"</span>,</span><br><span class="line">	<span class="string">'webContextRoot'</span> : pathname,</span><br><span class="line">	<span class="string">'datesLocalization'</span> : <span class="literal">false</span></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure><p>在idm/scripts/app-cfg.js文件中，修改contextRoot为flowable_idm，与静态资源访问路径区分开。</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">'use strict'</span>;</span><br><span class="line"><span class="keyword">var</span> FLOWABLE = FLOWABLE || &#123;&#125;;</span><br><span class="line"><span class="keyword">var</span> pathname = <span class="built_in">window</span>.location.pathname.replace(<span class="regexp">/^(\/[^\/]*)(\/.*)?$/</span>, <span class="string">'$1'</span>).replace(<span class="regexp">/\/$/</span>, <span class="string">''</span>);</span><br><span class="line">FLOWABLE.CONFIG = &#123;</span><br><span class="line">	<span class="string">'onPremise'</span> : <span class="literal">true</span>,</span><br><span class="line">	<span class="string">'contextRoot'</span> : <span class="string">"/flowable_idm"</span>,</span><br><span class="line">	<span class="string">'webContextRoot'</span> : pathname,</span><br><span class="line">	<span class="string">'datesLocalization'</span> : <span class="literal">false</span></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure><p>在task/scripts/app-cfg.js文件中，修改contextRoot为flowable_task，与静态资源访问路径区分开。</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">'use strict'</span>;</span><br><span class="line"><span class="keyword">var</span> FLOWABLE = FLOWABLE || &#123;&#125;;</span><br><span class="line"><span class="keyword">var</span> pathname = <span class="built_in">window</span>.location.pathname.replace(<span class="regexp">/^(\/[^\/]*)(\/.*)?$/</span>, <span class="string">'$1'</span>).replace(<span class="regexp">/\/$/</span>, <span class="string">''</span>);</span><br><span class="line">FLOWABLE.CONFIG = &#123;</span><br><span class="line">	<span class="string">'onPremise'</span> : <span class="literal">true</span>,</span><br><span class="line">	<span class="string">'contextRoot'</span> : <span class="string">"/flowable_task"</span>,</span><br><span class="line">	<span class="string">'webContextRoot'</span> : pathname,</span><br><span class="line">	<span class="string">'datesLocalization'</span> : <span class="literal">false</span></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure><p>admin和其他的不一样，所以我作为一个后端人员修改前端，采取的方式是在admin/scripts/config.js文件中，增加上面类似配置。</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">FlowableAdmin.webContextRoot = <span class="string">'/flowable_admin'</span>;</span><br></pre></td></tr></table></figure><p>然后通过开发工具，给所有的REST请求的增加<code>FlowableAdmin.webContextRoot +</code>前缀。</p><p>如：</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">url: <span class="string">'/app/</span></span><br></pre></td></tr></table></figure><p>替换为</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">url: FlowableAdmin.webContextRoot + <span class="string">'/app/</span></span><br></pre></td></tr></table></figure><p>其他非这种格式的URL，可自行手动修改。</p><p>至此前后端基本集成完毕。</p><p>执行后端SpringBoot启动类，启动后端服务。</p><p>启动Nginx。</p><p>此时通过以下四个链接，即可访问Flowable官方提供的四个操作页面，不过在第一次访问时，由于没有登录，会跳转到登录页面，在后端工程初次启动时，会初始化两个账号，可通过<code>ACT_ID_USER</code>表查询用户名密码。</p><blockquote><p><a href="http://localhost:8081/idm/" target="_blank" rel="noopener">http://localhost:8081/idm/</a></p></blockquote><p><img src="https://upload-images.jianshu.io/upload_images/5688362-17b8a05864b7a40b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="flowable_idm"></p><blockquote><p><a href="http://localhost:8081/modeler/" target="_blank" rel="noopener">http://localhost:8081/modeler/</a></p></blockquote><p><img src="https://upload-images.jianshu.io/upload_images/5688362-bd259f559420789c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="flowable_modeler"></p><blockquote><p><a href="http://localhost:8081/task/" target="_blank" rel="noopener">http://localhost:8081/task/</a></p></blockquote><p><img src="https://upload-images.jianshu.io/upload_images/5688362-fc6dfd540a9a3d54.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="flowable_task"></p><blockquote><p><a href="http://localhost:8081/admin/" target="_blank" rel="noopener">http://localhost:8081/admin/</a></p></blockquote><p><img src="https://upload-images.jianshu.io/upload_images/5688362-2d1072782ca19155.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="flowable_admin"></p><p>下一篇会将集成的过程中整理的相关知识稍作总结。</p><p>附录：<br>后端源码地址：<a href="https://github.com/ArtIsLong/flowable-ui.git" target="_blank" rel="noopener">https://github.com/ArtIsLong/flowable-ui.git</a><br>前端源码地址：<a href="https://github.com/ArtIsLong/flowable-ui-web.git" target="_blank" rel="noopener">https://github.com/ArtIsLong/flowable-ui-web.git</a></p><hr><p>关注我的微信公众号：FramePower<br>我会不定期发布相关技术积累，欢迎对技术有追求、志同道合的朋友加入，一起学习成长！</p><hr><p><img src="https://artislong.oss-cn-hangzhou.aliyuncs.com/images/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7/%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B71.png" alt="微信公众号"></p><div class="reward"><div class="reward-button">赏 <span class="reward-code"><span class="alipay-code"><img class="alipay-img wdp-appear" src="/css/images/alipay.jpeg"></span> <span class="wechat-code"><img class="wechat-img wdp-appear" src="/css/images/Wechat.jpeg"></span></span></div><p class="reward-notice">如果文章对你有帮助，欢迎点击上方按钮打赏作者</p></div></div><footer class="article-footer"><div class="share-container"><div class="bdsharebuttonbox"> <a href="#" class="bds_more" data-cmd="more">分享到：</a> <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a> <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a> <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a> <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a> <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a></div><script>with(window._bd_share_config={common:{bdSnsKey:{},bdText:"",bdMini:"2",bdMiniList:!1,bdPic:"",bdStyle:"0",bdSize:"16"},share:{bdSize:16}},document)(getElementsByTagName("head")[0]||body).appendChild(createElement("script")).src="http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion="+~(-new Date/36e5)</script><style>.bdshare_popup_box{border-radius:4px;border:#e1e1e1 solid 1px}.bdshare-button-style0-16 .bds_more,.bdshare-button-style0-16 a{padding-left:20px;margin:6px 10px 6px 0}.bdshare_dialog_list a,.bdshare_popup_bottom a,.bdshare_popup_list a{font-family:'Microsoft Yahei'}.bdshare_popup_top{display:none}.bdshare_popup_bottom{height:auto;padding:5px}</style></div></footer></div><nav id="article-nav"> <a href="/2019/07/14/SpringBoot完美整合Jfinal/" id="article-nav-newer" class="article-nav-link-wrap"><strong class="article-nav-caption">上一篇</strong><div class="article-nav-title"> SpringBoot完美整合Jfinal</div></a> <a href="/2019/05/25/Flowable五个引擎及相关服务总结/" id="article-nav-older" class="article-nav-link-wrap"><strong class="article-nav-caption">下一篇</strong><div class="article-nav-title">Flowable五个引擎及相关服务总结</div></a></nav></article><section id="comments"></section></section><aside id="sidebar"><div class="widget-wrap"><h3 class="widget-title">最新文章</h3><div class="widget"><ul id="recent-post" class=""><li><div class="item-thumbnail"><a href="/2019/07/14/SpringBoot完美整合Jfinal/" class="thumbnail"><span class="thumbnail-image thumbnail-none"></span></a></div><div class="item-inner"><p class="item-category"><a class="article-category-link" href="/categories/SpringBoot/">SpringBoot</a></p><p class="item-title"><a href="/2019/07/14/SpringBoot完美整合Jfinal/" class="title">SpringBoot完美整合Jfinal</a></p><p class="item-date"><time datetime="2019-07-14T15:32:31.000Z" itemprop="datePublished">2019-07-14 23:32:31</time></p></div></li><li><div class="item-thumbnail"><a href="/2019/06/27/SpringBoot集成Flowable-UI/" class="thumbnail"><span class="thumbnail-image thumbnail-none"></span></a></div><div class="item-inner"><p class="item-category"><a class="article-category-link" href="/categories/工作流/">工作流</a><i class="fas fa-angle-right"></i><a class="article-category-link" href="/categories/工作流/Flowable/">Flowable</a></p><p class="item-title"><a href="/2019/06/27/SpringBoot集成Flowable-UI/" class="title">SpringBoot集成Flowable UI</a></p><p class="item-date"><time datetime="2019-06-26T16:27:21.000Z" itemprop="datePublished">2019-06-27 00:27:21</time></p></div></li><li><div class="item-thumbnail"><a href="/2019/05/25/Flowable五个引擎及相关服务总结/" class="thumbnail"><span class="thumbnail-image thumbnail-none"></span></a></div><div class="item-inner"><p class="item-category"><a class="article-category-link" href="/categories/工作流/">工作流</a><i class="fas fa-angle-right"></i><a class="article-category-link" href="/categories/工作流/Flowable/">Flowable</a></p><p class="item-title"><a href="/2019/05/25/Flowable五个引擎及相关服务总结/" class="title">Flowable五个引擎及相关服务总结</a></p><p class="item-date"><time datetime="2019-05-25T15:43:07.000Z" itemprop="datePublished">2019-05-25 23:43:07</time></p></div></li><li><div class="item-thumbnail"><a href="/2019/03/01/微服务基础概念认知总结/" class="thumbnail"><span class="thumbnail-image thumbnail-none"></span></a></div><div class="item-inner"><p class="item-category"><a class="article-category-link" href="/categories/思考/">思考</a></p><p class="item-title"><a href="/2019/03/01/微服务基础概念认知总结/" class="title">微服务基础概念认知总结</a></p><p class="item-date"><time datetime="2019-03-01T15:17:33.000Z" itemprop="datePublished">2019-03-01 23:17:33</time></p></div></li><li><div class="item-thumbnail"><a href="/2019/03/01/Oracle-SQL优化总结/" class="thumbnail"><span class="thumbnail-image thumbnail-none"></span></a></div><div class="item-inner"><p class="item-category"><a class="article-category-link" href="/categories/Oracle/">Oracle</a></p><p class="item-title"><a href="/2019/03/01/Oracle-SQL优化总结/" class="title">Oracle SQL优化总结</a></p><p class="item-date"><time datetime="2019-03-01T07:30:47.000Z" itemprop="datePublished">2019-03-01 15:30:47</time></p></div></li></ul></div></div><div class="widget-wrap"><h3 class="widget-title">分类</h3><div class="widget"><ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Alibaba/">Alibaba</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Docker/">Docker</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java基础/">Java基础</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Nginx/">Nginx</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Oracle/">Oracle</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Redis/">Redis</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Shiro/">Shiro</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Spring/">Spring</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/SpringBoot/">SpringBoot</a><span class="category-list-count">7</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/SpringBoot/Shiro/">Shiro</a><span class="category-list-count">1</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/Storm/">Storm</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tomcat/">Tomcat</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Zookeeper/">Zookeeper</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/工作流/">工作流</a><span class="category-list-count">3</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/工作流/Activiti/">Activiti</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/工作流/Flowable/">Flowable</a><span class="category-list-count">2</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/工具/">工具</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/开发工具框架/">开发工具框架</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/思考/">思考</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/服务器/">服务器</a><span class="category-list-count">1</span></li></ul></div></div><div class="widget-wrap"><h3 class="widget-title">归档</h3><div class="widget"><ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">七月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">六月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">五月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">三月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/">二月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">一月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">十二月 2018</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">十一月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/08/">八月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/">七月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">三月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">二月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">一月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">十二月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">十月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">六月 2017</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/12/">十二月 2016</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">七月 2016</a><span class="archive-list-count">1</span></li></ul></div></div><div class="widget-wrap"><h3 class="widget-title">标签</h3><div class="widget"><ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Alibaba/">Alibaba</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Docker/">Docker</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Git/">Git</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Idea/">Idea</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Jackson/">Jackson</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java基础/">Java基础</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Lombok/">Lombok</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Nginx/">Nginx</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Oracle/">Oracle</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Quartz/">Quartz</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Redis/">Redis</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Session/">Session</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Shiro/">Shiro</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Spring/">Spring</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SpringBoot/">SpringBoot</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Storm/">Storm</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Swagger/">Swagger</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Tomcat/">Tomcat</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Zookeeper/">Zookeeper</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/前后端分离/">前后端分离</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/多数据源/">多数据源</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/工作流/">工作流</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/工具/">工具</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/开发工具框架/">开发工具框架</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/微服务/">微服务</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据库/">数据库</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/负载均衡/">负载均衡</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/集群/">集群</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/面试题/">面试题</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/项目架构/">项目架构</a><span class="tag-list-count">2</span></li></ul></div></div><div class="widget-wrap"><h3 class="widget-title">标签云</h3><div class="widget tagcloud"> <a href="/tags/Alibaba/" style="font-size:10px">Alibaba</a> <a href="/tags/Docker/" style="font-size:15px">Docker</a> <a href="/tags/Git/" style="font-size:10px">Git</a> <a href="/tags/Idea/" style="font-size:10px">Idea</a> <a href="/tags/Jackson/" style="font-size:10px">Jackson</a> <a href="/tags/Java基础/" style="font-size:17.5px">Java基础</a> <a href="/tags/Lombok/" style="font-size:10px">Lombok</a> <a href="/tags/Nginx/" style="font-size:15px">Nginx</a> <a href="/tags/Oracle/" style="font-size:10px">Oracle</a> <a href="/tags/Quartz/" style="font-size:10px">Quartz</a> <a href="/tags/Redis/" style="font-size:12.5px">Redis</a> <a href="/tags/Session/" style="font-size:10px">Session</a> <a href="/tags/Shiro/" style="font-size:12.5px">Shiro</a> <a href="/tags/Spring/" style="font-size:12.5px">Spring</a> <a href="/tags/SpringBoot/" style="font-size:20px">SpringBoot</a> <a href="/tags/Storm/" style="font-size:10px">Storm</a> <a href="/tags/Swagger/" style="font-size:12.5px">Swagger</a> <a href="/tags/Tomcat/" style="font-size:12.5px">Tomcat</a> <a href="/tags/Zookeeper/" style="font-size:10px">Zookeeper</a> <a href="/tags/前后端分离/" style="font-size:10px">前后端分离</a> <a href="/tags/多数据源/" style="font-size:10px">多数据源</a> <a href="/tags/工作流/" style="font-size:15px">工作流</a> <a href="/tags/工具/" style="font-size:10px">工具</a> <a href="/tags/开发工具框架/" style="font-size:15px">开发工具框架</a> <a href="/tags/微服务/" style="font-size:10px">微服务</a> <a href="/tags/数据库/" style="font-size:10px">数据库</a> <a href="/tags/负载均衡/" style="font-size:10px">负载均衡</a> <a href="/tags/集群/" style="font-size:10px">集群</a> <a href="/tags/面试题/" style="font-size:10px">面试题</a> <a href="/tags/项目架构/" style="font-size:12.5px">项目架构</a></div></div><div class="widget-wrap widget-list"><h3 class="widget-title">链接</h3><div class="widget"><ul><li> <a href="https://www.xiefayang.com">i蝸居年華_谢谢谢</a></li><li> <a href="http://fullsmilespace.com">微笑空间站</a></li></ul></div></div><div id="toTop" class="fas fa-angle-up"></div></aside></div><footer id="footer"><div class="outer"><div id="footer-info" class="inner"> &copy; 2020 ArtIsLong的博客<br> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. Theme by <a href="http://github.com/ppoffice">PPOffice</a></div></div><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></footer><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"><script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script><script>if(document.getElementById("comments")){var id=decodeURI(window.location.pathname),gitalk=new Gitalk({id:id,owner:"ArtIsLong",repo:"ArtIsLong.github.io",admin:["ArtIsLong"],clientID:"2f97f5d71dbb65bf01e1",clientSecret:"f715a8e1507c1fef1c5e3cfaccef8f59aa734318",distractionFreeMode:!0,createIssueManually:!1,perPage:15});gitalk.render("comments")}</script><script src="/libs/lightgallery/js/lightgallery.min.js"></script><script src="/libs/lightgallery/js/lg-thumbnail.min.js"></script><script src="/libs/lightgallery/js/lg-pager.min.js"></script><script src="/libs/lightgallery/js/lg-autoplay.min.js"></script><script src="/libs/lightgallery/js/lg-fullscreen.min.js"></script><script src="/libs/lightgallery/js/lg-zoom.min.js"></script><script src="/libs/lightgallery/js/lg-hash.min.js"></script><script src="/libs/lightgallery/js/lg-share.min.js"></script><script src="/libs/lightgallery/js/lg-video.min.js"></script><script src="/libs/justified-gallery/jquery.justifiedGallery.min.js"></script><script src="/js/main.js"></script></div><script>((window.gitter={}).chat={}).options={room:"artislong/Lobby"}</script><script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer="defer"></script><script type="text/javascript" color="0,0,255" opacity="0.7" zindex="-2" count="99" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script><script async custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script></body>